package HomeWork;

/**
 * @description:
 * @Author yyp
 * @time
 */
public class HomeWork07 {
    public static void main(String[] args) {
        Car07 car07 = new Car07(50);
        car07.getAir().flow();
        car07.temperature = -10;
        car07.getAir().flow();
    }
}
class Car07{
    public int temperature;
    class Air{
        public void flow(){
            if (temperature>40){
                System.out.println("冷风");
            }else if (temperature<0){
                System.out.println("暖风");
            }else {
                System.out.println("关空调");
            }
        }
    }
    public Air getAir() {
        return new Air();
    }
    public Car07(int temperature) {
        this.temperature = temperature;
    }
}
